<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f = "http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"  
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Edit-RefPortal</title>
    </h:head>  
    <h:body>
        <ui:composition template="./BannersAndMenusTemplate.jsf">

            <ui:define name="content">
                <h:form id="form" rendered="#{user.getlogin()}">
                    <p:panel header="Add new Author">  

                        <h:panelGrid columns="2">    
                            <h:outputLabel  value="Name: *" />  
                            <h:inputText value = "#{user.aname}"/>     

                            <h:outputLabel  value="Surname: *" />  
                            <h:inputText value = "#{user.asname}"/>


                        </h:panelGrid>   

                        <p style="color:blue">*Please leave empty if you do not wish to add more names*</p>

                        <p:fieldset legend="Add more names" collapsed="true" toggleable="true" toggleSpeed="500">  
                             <h:panelGrid columns="2" >  

                                <h:outputLabel  value="Other Name 1: " />  
                                <h:inputText value = "#{user.aname1}"  required="false" />
                                <h:outputLabel  value="Other Name 2: " />  
                                <h:inputText value = "#{user.aname2}" required="false"  />
                                <h:outputLabel  value="Other Name 3: " />  
                                <h:inputText value = "#{user.aname3}"  required="false" />
                                <h:outputLabel  value="Other Name 4: " />  
                                <h:inputText value = "#{user.aname4}" required="false"/>
                                <h:outputLabel  value="Other Name 5: " />  
                                <h:inputText value = "#{user.aname5}"  required="false" /> 


                            </h:panelGrid> 
                        </p:fieldset>  

                        <p:commandButton id="saveButton"   value="Create" action = "#{user.addAuthor2}" onclick=""/> 


                    </p:panel>       
                </h:form>
                <h:form rendered="#{user.login2}">  
                    <a href="login.jsf">please log in again</a>
                </h:form>
            </ui:define>

        </ui:composition>


    </h:body>

</html>

